class P138PreCalc
{

    public P138PreCalc()
    {
    }

    public static void main(String args[])
    {
        int counter = 2;
        for(int k = 0; k < 10; k++)
        {
            while(!process(counter)) 
                counter++;
            counter++;
        }

    }

    private static boolean process(long counter)
    {
        long k1 = 0L;
        k1 = (((1L + counter) - 1L) * (counter - 1L)) / 2L;
        long k2 = 0L;
        long k = counter + 1L;
        do
        {
            k2 += k;
            k++;
        } while(k1 > k2);
        if(k1 == k2)
        {
            System.out.println(counter + " " + (k - 1L));
            return true;
        } else
        {
            return false;
        }
    }
}
